<%--
  Created by IntelliJ IDEA.
  User: huanghuichi
  Date: 2017/11/9
  Time: 9:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>航空后台管理界面</title>
</head>
<style type="text/css">
    body {
        color: #000;
        font-size: 14px;
        margin: 20px auto;
    }
</style>
<script>
    var path = '<%=request.getContextPath()%>';
    function check(form) {
        //document.forms.form1.username.value取得form1中Username的值 并判断是否为空
        if (document.forms.LoginForm.name.value == "") {
            //如果 为""则弹出提示
            alert("请输入用户名！");
            //将输入焦点定位到没有输入的地方
            document.forms.LoginForm.name.focus();
            //返回错误
            return false;
        }
        if (document.forms.LoginForm.mpwd.value == "") {
            alert("请输入密码！");
            document.forms.LoginForm.mpwd.focus();
            return false;
        }
    }
</script>
<body>
<form action="<%=request.getContextPath()%>/security/checkpwd.action" method="post" name="LoginForm">
    <table border="1" cellspacing="0" cellpadding="5" bordercolor="silver" align="center">
        <tr>
            <td colspan="2" align="center" bgcolor="#E8E8E8">用户登陆</td>
        </tr>
        <tr >
            <td>帐号：</td>
            <td><input type="text" name="name" /></td>
        </tr>
        <tr>
            <td>密码：</td>
            <td><input type="password" name="mpwd" /></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" name="submit" value="登录" onclick="return check(this);" />
                <input type="reset" name="reset" />
            </td>
        </tr>
    </table>
</form>
</body>
</html>
